package com.yanqu.road.server.cmd.cross.player;

import com.yanqu.road.pb.player.PlayerProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_CROSS_TO_WATCH_PLAYER_RESP, desc = "跨服拜访玩家响应")
public class CrossWatchPlayerRespCmd extends AbstractCommand {

	@Override
	public boolean parseData(YanQuMessage packet) throws Exception {
		return true;
	}

	@Override
	public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
		PlayerProto.CrossWatchPlayerSimpleRespMsg reqMsg = PlayerProto.CrossWatchPlayerSimpleRespMsg.parseFrom(packet.getBytes());
		player.sendPacket(Protocol.U_WATCH_PLAYER, reqMsg.getRespData().toBuilder());
	}

	@Override
	public void sendData(GamePlayer player) {

	}
}
